package com.example.model;

import android.graphics.Canvas;

/**
 * 这是一个描述小球的属性的基本类
 */
public class Ball {
    private float x; // 小球的x坐标
    private float y; // 小球的y坐标
    private float r; // 小球的半径
    private float vx; // 小球的x方向速度
    private float vy; // 小球的y方向速度
    private int color; // 小球的颜色

    public Ball(float x, float y, float r, float vx, float vy, int color) {
        this.x = x;
        this.y = y;
        this.r = r;
        this.vx = vx;
        this.vy = vy;
        this.color = color;
    }

    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public float getY() {
        return y;
    }

    public void setY(float y) {
        this.y = y;
    }

    public float getR() {
        return r;
    }

    public void setR(float r) {
        this.r = r;
    }

    public float getVx() {
        return vx;
    }

    public void setVx(float vx) {
        this.vx = vx;
    }

    public float getVy() {
        return vy;
    }

    public void setVy(float vy) {
        this.vy = vy;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public void move(int width, int height) {

    }

    public void draw(Canvas canvas) {

    }
}